package com.airy.apprepairequipment.common.util;

public class GlobalUtils {
	/**
	 * APP放行IMEI
	 */
	public static final String APP_FREE_IMEI = "zM1smVcq4Py";
	/**
	 * 统一访问前缀：/yfax-htt-api
	 */
	public static final String URL = "/yfax-htt-api";
	/**
	 * api接口：/api/htt
	 */
	public static final String PROJECT_HTT = "/api/htt";
	/**
	 * 格式化
	 */
	public static final String DECIMAL_FORMAT = "#0.000";


	/**
	 * API接口调用验证秘钥/在线网站生成一个秘钥
	 */
	public final static String API_KEY = "xxx";
	
	/**
	 * 验证参数请求合法性
	 * @return
	 */
	public static boolean verifyParams(String paramsStr, String uId) {
		paramsStr = paramsStr + "&key=" + API_KEY;
		//小写比较
    		String md5Result = MD5Util.encodeByMD5(paramsStr).toLowerCase();
    		//md5校对结果
    		return md5Result.equals(uId.toLowerCase());
	}
	

}
